/**
 * IDC 机房信息管理 api
 * @type {BaseHouseInfoApi}
 */
const baseHouseInfoApi = new class BaseHouseInfoApi extends BaseApi {
    constructor() {
        super({
            url: '/api/baseHouseInfo',
            exp: true,
            imp: true,
        })
    }

    async selectHouseNumByIdcId(idcId, houseId) {
        return (await rxajax.get(this.using(`/idc-id/${idcId}/house-num/${houseId}`))).data.data
    }

    async selectHouseNameByIdcId(idcId, houseName) {
        return (await rxajax.get(this.using(`/idc-id/${idcId}/house-name/${houseName}`))).data.data
    }

    async insertReport(id) {
        return (await rxajax.post(this.using(`/insert-report/${id}`))).data
    }

    async updateReport(id) {
        return (await rxajax.post(this.using(`/update-report/${id}`))).data
    }
}()
